package org.colafries.admin.controller;

import org.colafries.admin.entity.vo.index.IndexQueryReqVO;
import org.colafries.admin.entity.vo.index.IndexQueryRspVO;
import org.colafries.admin.service.index.IndexQueryService;
import org.colafries.admin.wrapper.Response;
import org.colafries.admin.wrapper.ResponseWrapper;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Ann
 * @version v1.0
 * @ClassName IndexQueryController
 * @Description
 * @date Created in 2024/6/13
 **/
@RestController
@RequestMapping("/api")
public class APIController {

    @Resource
    IndexQueryService indexQueryService;
    /**
     * 指标查询
     * @param indexQueryReqVO
     * @return org.colafries.admin.wrapper.Response
     * @Author anning
     * @Date 2024/6/13
     */
    @PostMapping("/indexQuery")
    public Response indexQuery(@RequestBody IndexQueryReqVO indexQueryReqVO) {
        IndexQueryRspVO result = indexQueryService.query(indexQueryReqVO);
        return ResponseWrapper.ok(result);
    }
}
